switch and collisions

Blitz3D Forums/Blitz3D Beginners Area/switch and collisions

David(Posted 2004) [#1]
i have a problem, if the entity no move no check collisions.
how detect switch if the entity no move and the switch activated with left buttom of mouse?


jhocking(Posted 2004) [#2]
Perhaps you want CameraPick? I'm not sure exactly what you're asking, but the normal way to use a mouse with a 3D scene is using the CameraPick command.


(tu) sinu(Posted 2004) [#3]
could you be clearer, are you trying to check for collisions on a non moving entity?


David(Posted 2004) [#4]
sorry i am spanish and my english is bad.
i have a level or map with buttons, one entity is a human, this entity use buttons, i cant check this buttons beacuse the entity no move and the blitz3d no return this collisions, as i can detect the buttons?


AbbaRue(Posted 2004) [#5]
I think he is asking how can you detect when the mouse arrow is over a spot in an image, so you can click the left mouse button on the image.
Since the mouse arrow isn't a moving entity, collision detection won't work.
I think camerapick is probably what he is looking for.


Agamer(Posted 2004) [#6]
ummm yeh what I was going to sya funny I thought I had already said it huumm


David(Posted 2004) [#7]
i no use arrow of mouse, i use the entity for human and the buttons in the level are entities too.
the left button is a action for use the buttons entities in the map maked with mapplet, i can use space bar too or other key in the keyboard.
example: the entity human is ahead or proximity button entity, but only active with i use a left button or space bar or other key.
i cant use camera pick beacuse the game is 3 person, the camera follow a entity human


(tu) sinu(Posted 2004) [#8]
your wanting your player to activate buttons/switches when he stands next to them, but your using collisions and get no returned value if the player is not moving?
Create a larger sphere around your player and position it at the players position(do not parent it) all the time, that way if your player is standing next to the switch the sphere will get moved back but will try to reposition at the players position thus always colliding even when standing still.


David(Posted 2004) [#9]
very thanks sinu is a big idea :)


Brendane(Posted 2004) [#10]
A bit of spanish for David's benefit..

David, yo tengo otra idea - porque creo que si usas la idea anterior no va a funcionar todo el tiempo - es posible que a veces las esferas se no pueden juntar... creo que es mejor probar la distancia entre las dos entidades. (Lamento mi espanol no es tan bueno como el ingles tuyo - aprendo desde hace un ano nomás).

and in english,
It's possible that the sphere collision method might not work since it may not be possible for the two spheres to collide (colliding with other objects already, etc.) - it's probably a better idea to just check the distance between the two entities and act on that.


(tu) sinu(Posted 2004) [#11]
the way i have given should suit his needs.


Zethrax(Posted 2004) [#12]
An 'EntityDistance' check between the game character entity and proximity switch entity, as Brendane suggested, pre-culled with an axially aligned bounding box check, is probably the best way to go. If you can get away with just using box shaped axially aligned zones for the proximity check, then you can eliminate the 'EntityDistace check and gain some extra speed.