Need help with Collisions

Blitz3D Forums/Blitz3D Beginners Area/Need help with Collisions

CHALLENGER426(Posted 2008) [#1]
i have been trying to add collisions/ and assign a type to this "skybox", but every time i think i get it to work, my player can just go through it, any ideas, THANKS



Cp(Posted 2008) [#2]
You first have to set it up using a command called:
Collisions player_type,skybox_type,#of_action;something like this,look it up in the documentation

But, before you can even do that, you have to do this:
entitytype sphere,player_type;check below description,except its for the player.
entitytype skybox,skybox_type;the first parameter is the skybox's mesh. the second is what you use to reference it to see if it has collided.

and why not weld the skybox into one mesh while you are at it?


CHALLENGER426(Posted 2008) [#3]
i am new at this and i know how to do that, but... like u said, how do i make it into one big mesh?


Stevie G(Posted 2008) [#4]
+ remember to include updateworld() in your main loop.


Your skybox is already a single mesh ( albeit mutiple surfaces ) so not sure what CP is on about. Welding this mesh would have zero benefits.

You shouldn't really have any collisions with your skybox at all. It's generally a background effect only.


CHALLENGER426(Posted 2008) [#5]
i am using the skybox to keep the player in the map


Cp(Posted 2008) [#6]
Idea2:Create a surface that is totally invisible using alpha, and have the player collide with that, instead of the skybox.


Stevie G(Posted 2008) [#7]
i am using the skybox to keep the player in the map


Well, like I said, you shouldn't be using it for that purpose. Generally a skybox should be positioned at the camera coords each frame with entityorder set to render it first. In this case you do not need to scale it very much.

As CP says, you could create a cube ... flip it, set alpha to 0 and use this as an invisible collision proxy. It really depend on how your level is set up though?


Cp(Posted 2008) [#8]
another idea(my last one): move the skybox along with the player, so the player never goes out of the skybox.


CHALLENGER426(Posted 2008) [#9]
thanks for the help, i'm going to create a surface that is invisible for the player to collide with