- Home /
Collision with empty space
Hi, maybe its a dumb question, but I seriously need help. Normally after leaving platform, object with rigidbody falls off in empty space. Can i make that rigidbody object collide with empty space, so it cant get past platform ? I can't make "walls" or colliders on platform, i just can't touch it. Do you guys have any idea what to do ? thanks in advance
Not sure I understand but can you do any of these?
/Use a box collider with no mesh /Detect if you're touching the ground with raycasting /Detect if you're falling by checking velocity /Create a trigger in that area that activates a bool
maybe Its just not possible to do something like this :/ I dont know in which side of platform next one will attach to, I want to not fall off of them and move from one to another. Well I think ill have to abandon that idea and create new project.
If you can put the logic from your head on to paper, you can code it. Dont give up.
Answer by Naktrem · Mar 30, 2018 at 10:55 PM
Well you can create empty game object and collider inside it. Then you can parent that to the platform object and use this collider. Also you can use this collider as a trigger.
well, there is the problem. I can't do anything with platform including attaching any gameobjects. Platform is spawning on random coordinates so creating a collider near it it also pointless. But thanks for fast reply tho :)
Here is what its look like. I have several platforms spawning in random coordinates. After defeating an enemy on first platform, nearest platform is attached to first one. It can attach in one of 4 sides of square platform(its random). I just need to not fall off of them.
Have the enemy on the platform also spawn 2 colliders on left and right side of platform, then when he dies have them delete
Answer by TurboXWorldTechnology · Dec 23, 2021 at 03:42 PM
Perhaps you can create your walls and then disable their mesh render. If you are asking something please explain clearly, cause as far as I understand your question I think disabling mesh render of the walls will do the trick.
Your answer
Follow this Question
Related Questions
How can I get player to move when only touching an object 0 Answers
Have a character face their moving direction? 1 Answer
Player Controller moves automatically forward. cant stop. 1 Answer
My Player is crossing the ground through air 1 Answer
How to Logically Match Ground Slope While Using This Code? 1 Answer