Help With Arrow Game
![forali](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
Okay so basically im tearing apart the physics cannon template, I have a few questions
First off, how would i make it so the arrows collision range wasnt the size of the original ball, I changed the base image of the ball to an arrow I designed but when it hits the ground or the bricks it just bounces off when I want it to stick into the ground or bricks... like an arrow.
The second question is how to stop the arrow from going through multiple bricks when i have the arrow set to destroy it on contact, I have designed the brick to be destroyed when hit by the arrow, but when this happens it just goes straight through it, i would like it to just stick to the brick itself and then have the brick destroyed
First off, how would i make it so the arrows collision range wasnt the size of the original ball, I changed the base image of the ball to an arrow I designed but when it hits the ground or the bricks it just bounces off when I want it to stick into the ground or bricks... like an arrow.
The second question is how to stop the arrow from going through multiple bricks when i have the arrow set to destroy it on contact, I have designed the brick to be destroyed when hit by the arrow, but when this happens it just goes straight through it, i would like it to just stick to the brick itself and then have the brick destroyed
Comments
To make the arrow stick.
Try creating this rule on your arrow.
Create new rule: ANY
When actor overlaps or collides with ground
When actor overlaps or collides with Brick
Put in 2 change attribute behaviors within the rule
Change attribute arrow.motion.linear.X = 0
Change attribute arrow.motion.linear.Y = 0
THIS MIGHT NOT WORK IS CANON DEMO HAS GRAVITY
If it does i would go to scene and check it off.
And then put a accelerate behavior on your arrow making it accelerate down with around 200 to simulate gravity.
Second:
If you want arrow to stick to your moving brick is where it gets more tricky. GameSalad dont have joints "yet" but you will need to make some constrain behaviors. but iam not sure how depending on your current rule set.
Why dont destroy both arrow and brick at the same time. and make the arrow stick to the ground.
Just a thought