Outstanding! Life saver :) I was struggling a lot and thinking that the only way to interact with a rigidbody was having a rigidbody character... I am trying to push and rotate a soccer ball with my character controller. Any idea how to rotate the ball? Thanks 👍
@wtbsomething2427 Жыл бұрын
Thanks a lot
@kazrepair7219 Жыл бұрын
thanks a lot broo
@ericreyes8525 Жыл бұрын
Awesome!!!!!
@gaming4witwizjagerlionandtrifc8 ай бұрын
why does it say Assets\MoveableObject.cs(13,18): error CS1026: ) expected when i typed using System.Collections; using System.Collections.Generic; using UnityEngine; public class MoveableObject : MonoBehaviour { public float pushForce = 1; private void OnControllerColliderHit(ControllerColliderHit hit) { Rigidbody _rigg = Hit.collider.attachedRigbody; if(_rigg i= null { Vector3 forceDirection = hit.gameobject.transform.position = transform.position; forceDirection.y = 0: forceDirection.normalize(); _rigg.AddForceAtPosition(forceDirection * pushForce, transfrom.position, ForceMode.Impulse); } } }