playMaker

Author Topic: isKinematic Gameobject slowly moving  (Read 414 times)

SawyerK

  • Junior Playmaker
  • **
  • Posts: 92
isKinematic Gameobject slowly moving
« on: January 28, 2023, 02:27:44 PM »
Hi!

I'm trying to create a physics lock system for my trucking game. I made an fsm that triggers, waits, then locks and parents the item to the bed of the truck.
This works fine except the item that has the isKinematic checked and useGravity unchecked still slowly moving downwards pushing the truck into the ground making it impossible to drive.
What could be the problem here?
Thank you!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: isKinematic Gameobject slowly moving
« Reply #1 on: January 29, 2023, 01:50:52 AM »
Hi.
Maybe try adjusting the mass.
also after setting gravity 0 try Set velocity 0,0,0 (not every frame)

SawyerK

  • Junior Playmaker
  • **
  • Posts: 92
Re: isKinematic Gameobject slowly moving
« Reply #2 on: January 30, 2023, 02:12:37 PM »
Thank you for the reply.
I can't adjust the mass because it wouldn't fit the different kind of items (some items really heavy 1500 some really light 2)
I did add set velocity 0,0,0 and set angular velocity 0,0,0. Setting velocity before or after gravity 0 didn't make a difference.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: isKinematic Gameobject slowly moving
« Reply #3 on: January 31, 2023, 02:17:32 AM »
Hi.
Is the the collision detection on the truck (on Rigidbodies) set to Continuous?