- Home /
got char stuck near objects.
i am trying to make this character hit some boxes but when he hits, the boxes can push him over or backwards
var speed : float; var speedincrease : float; var massa : float; private var motor : CharacterMotor; var posy : float; function Start () { posy = transform.rotation.y;} function Awake () { motor = GetComponent(CharacterMotor);} function Update () { motor.inputJump = Input.GetButton("Jump"); transform.position.x = transform.position.x+Time.deltaTime*(speed-massa); transform.position.z = 0; transform.rotation.y = posy;}
This is really poorly described. You've told us what you want (kind of, there isn't much detail - more detail is better!), but not what's going wrong ("got stuck near objects" is really vague and unhelpful). We aren't $$anonymous$$d readers - give us ALL the details of what's going on.
Answer by NishantSood · Sep 23, 2013 at 10:13 AM
Increase the mass of the character and check the mass of the box. Keep the real world mass to get better result
Your answer
Follow this Question
Related Questions
transform.position = new Vector 3 NOT moving to correct position? 1 Answer
Position variable not updating 1 Answer
parent Transform.position unexpected behaviour when changing position 1 Answer
Why does moving a game object transform work in the WebGL build but not the Windows build? 1 Answer
Teleportation Loop issue 1 Answer