AddForce strangeness: Moves properly on Y one direction, rotates the other

I am levitating a mesh transform + rigidbody with AddForce that has a kinematic rigidbody child. It moves in every direction flawlessly with the following script (I do this for X and Z as well):

public float speed = 10f;
public RigidBody = rb;

void Update ()
{ InputUpdate(); }

void FixedUpdate()
{ MoveUpdate(); }

MoveUpdate()
{ if(UpDown)
    { rb.AddForce(transform.up * (speed* GetY.y), ForceMode.Force); }
}

InputUpdate()
{ UpDown = GetY(); }

float GetY()
{  if(Input.GetKey(KeyCode.R))
       return 1.0f;
   if(Input.GetKey(KeyCode.F))
       return -1.0f;
    return 0; }

The Z and X movement in either direction is smooth as butter. Y axis down is smooth as well, but Y axis up causes the object to rotate forward as if I was applying pitch, which I am not. I have adjusted drag and mass, and tried all the force types to no avail. If I remove the kinematic rb child it will move Y.up properly, but it doesn’t seem to make sense why all other directions do not have this effect if it is attached.


Has anyone seen this, or know of an alternate technique that would still have physics? Translate works, but its very artificial and abrupt.

Thank you for reading.

I made an empty scene with the cubes you described, and when I added this script to the parent object it worked fine. If you freeze the parent cube’s rotation does it work?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class asdff : MonoBehaviour {

    public float speed = 10f;
    public Rigidbody rb;
    public float UpDown;
 
    private void Start()
    {
        rb = GetComponent<Rigidbody>();
    }

    void Update()
    { InputUpdate(); }

    void FixedUpdate()
    { MoveUpdate(); }

    public void MoveUpdate()
    {
        
        rb.AddForce(transform.up * (speed * GetY()), ForceMode.Force);
    }

    public void InputUpdate()
    { UpDown = GetY(); }

    float GetY()
    {
        if (Input.GetKey(KeyCode.R))
            return 1.0f;
        if (Input.GetKey(KeyCode.F))
            return -1.0f;
        return 0;
    }
}