Why does actor rotate after spawning another actor?
GabTobBen
Member Posts: 6
The shooting actor can be rotated through controls to a certain position. When a button is pressed it can spawn another actor. However, when this second actor is spawn, the first (i.e. shooting) actor gets rotated around (even though no controls are active and the angle for the shooting actor does not change, which I checked that with display text. So it seems the shooting actor gets bounced around by the spawning actor, but I can find nothing in the physics settings that would make this happen. What can I do to fix this?
Comments
Without seeing your rules, it's hard to know why the spawner actor is moving after spawning.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
I can share the rules if that helps.
Many thanks in advance
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
attributes
DigitalWater (boolean) : spawned actor on screen
WaterFlow (boolean): actor can be spawned
X (real): attribute that stores the touch X position
Spawned actor:
accelerate direction 0 relative to actor, speed 300
when collision with (third actor: unrelated to shooting actor) destroy
attribute DigitalWater to False (ie no spawned actor on screen)
Shooting actor
rotate to (constant_a-constant_b*X) relative to scene, speed 200
when WaterFlow true, change attribute DigitalWater to true
Spawn actor (ie above actor) in back of actor, direction 90 relative to actor (rest is 0)
change attribute WaterFlow to false
Double-check that you haven't unlocked any of your actors on the scene (if you double-click on an actor on the scene itself you should see the lock symbol). If you have, try deleting and re-adding the actor to the scene. Unlocked instances have different rules from their locked prototypes that appear in the Actor inspector pane.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Anything else that could help?
I know you say it rotates "through controls", but could you be more specific, what kind of controls are you using ?
https://www.dropbox.com/s/t1x1mf44xhr3ctv/Shooting actor rotates after spawning actor.odt