Collisions and Particle Generation
![Max3D](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
Hi Guys,
I have a question if anyone is willing to help.
I have two actors one being a wall the other is the player controlled actor (by touch), is it possible to find the collision position and angle?
My reason for wanting to do this is that I am currently spawning a particle actor where the collision takes place and would like the particles to emanate from the wall, as though debris are being generated at the point of collision. Hope that makes sense![:) :)](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/smile.png)
Thanks in advance for any replies.
Max3D
I have a question if anyone is willing to help.
I have two actors one being a wall the other is the player controlled actor (by touch), is it possible to find the collision position and angle?
My reason for wanting to do this is that I am currently spawning a particle actor where the collision takes place and would like the particles to emanate from the wall, as though debris are being generated at the point of collision. Hope that makes sense
![:) :)](http://forums.gamesalad.com/plugins/emojiextender/emoji/twitter/smile.png)
Thanks in advance for any replies.
Max3D
Best Answer
-
GreenHavenGames Posts: 62
Create two game level variables. collisionX and collisionY
Player
Constrain self.positionX to game.collisionX.
Constrain self.positionY to game.collisionY.
Horizontal Wall
If collides with player set particle spawn point (to scene not actor) to game.collisionX
Vertical wall.
If collides with player set particle spawn point to game.collisionY.
Hope this makes sense. You can the add a few pixels either way to adjust the final start position of the particles.
Good luck,
Sam
Answers
Unless there was something I was missing that could help me achieve it this way.
Thanks again,
Max3D
Thank you for the info, I attempted as you suggested but the effect still didn't look right though. I have gone back to spawning the particles from the actor and modified the spawn points to better fake the effect.
Thank you both for your suggestions, this is what I am currently working on if you are interested : http://www.youtube.com/watch?feature=player_detailpage&v=b7b09KwJNJU
I've made several improvements since this video was made, my next task is to create some kind of NAV points to display the locations of certain elements.
Thanks again,
Max3D