whenever i test. when the Ship flies under the bridge the ship goes underneath the camera even though the timeline is set correctly, it doesnt follow the animation (my player rig is being animated), i had this problem before (i fixed it by redoing the animation), but now its back again. i can send more information if needed.
Does your spaceship have a collider attached? And does the bridge also have a collider? If so, it might be that the physics simulation moves the ship unterneath the bridge.
Player Ship and Bridge do have a collider attached, thank you for responding!!
In that case, if the playership collides with the bridge, it should get destroyed, shouldn’t it?
Otherwise, the ‘correct’ behaviour (in respect to the real world) would be that the spaceship, which is ‘less powerful’ than the bridge, gets moved along the outer side of the bridge collider. If the bridge was ‘less powerful’, the spaceship would push the bridge away.
If you have another solution in mind for this case, please let me know.
- Forum User Guides : How to mark a topic as solved
i understood the logic but how to fix this exactly? is there any way to alter the physics system in project setting to prevent?
How should the spaceship and camera behave according to your idea?
Apart from ‘flying through the bridge’ or ‘flying around the bridge’, I don’t know any alternative solution.
i tried removing the box Collider from the bridge but its still giving issues. the camera is where its supposed to be but the ship flies off screen.
Please double check the animation. Make sure that the PlayerShip (= the child of PlayerRig) is not animated. If it is animated, the animation controls the ship now. The camera must not be animated either.
For testing purposes, also try to disable the collider(s) of the PlayerShip. Then test your game again. If the issue persists, the problem is not the PlayerShip because, without any collider, it is not able to collide. In that case, the problem is very likely caused by the animation.
indeed My PlayerRig is animated not the ship, Camera isnt animated either, i turned of collision on the player Ship it still consists of the same problem.
Could you please record and share a video of the situation with the disabled collider on the player game object(s)? Also, please share screenshots of what you did and have in Unity, especially of the animation and the animated properties in the Animation window.
Actually, the player ship is supposed to move through the bridge because it does not have any solid collider anymore. Since the problem occurs, we should take another look at the animation(s).
What happens if you disable the animation track and create a new animation for the spaceship? Just create a rough animation for testing purposes to see if the problem always occurs at the bridge. If it happens only with your first animation, the problem is in that animation.
i have made a new animation for the Player Rig and the problem still seems to be there. its always happening near the bridge.
Could you please fill out our form and send me your zipped project (without the Temp and Library folders)? Don’t forget to add a link to this thread.
When you are done, drop me a line here, so I can check our server.
i have submitted, thank you for your time!!
Thank you. I downloaded your project, which took me about a day. Then I tried to look into the zip, which took me about an hour. Then I noticed that the Library folder was included in the zip. Unzipping the files would take me several hours. Unfortunately, with 250,000 students to support, I don’t have time to invest several hours to look into a student’s project.
If you still need my help, please upload the zip file as described above.