- Home /
How do I get the platform to effect these coins?
So, I managed to fix one issue I was having earlier with the coins sliding though the platform, it turns out the platform did not need a Rigidbody, but there you have it. Now however, I am having a new issue. As can be seen in the Gif above. The coin has dropped to the bottom of the zone and is standing upright, now the coin should be pulled over by the movement of the Tops Shelf. Along with that I need the already flat coins to move with the platform, and at the very least the one on the end should have fallen as the shelf moved out from under more than half of it.
|
I Don't expect anyone to walk me through an answer, but can anyone point me in the direction of what I should be looking at, because I am at a loss?
|
Thank you all
Cheyne
To identify the problem more precisely, we need to see the code for moving the upper platform, and what components are connected to the coins.
Answer by Bricktronic · Aug 16, 2021 at 08:34 AM
@ItsJacGaming I actually just fixed an issue like this a few minutes ago! So here's what I found works:
Add a rigidbody to the platform
Make it kinematic
Finally, in the code, access the rigidbody component, and move it with rigidbody.MovePosition()
Like this: body.MovePosition(new Vector3(0, 0, Mathf.Sin(Time.time * 0.5f)));
Thank you very much, This alleviated hours of stress headache. I knew it was something simple that I was overlooking but I honestly could not figure out what. once again thank you.
Answer by VoidPhoenix96 · Aug 14, 2021 at 05:19 AM
Maybe you should parent the coins to the platform so they have the same movement.
Your answer
Follow this Question
Related Questions
Funfair simulation help 0 Answers
Unity Waypoint Movement 0 Answers
2D Smooth movement and collision detection problem 0 Answers
How to program gravity for planets? 3 Answers