Attaching shadows
HawtSawce
Member Posts: 42
Anyone have a tip for creating shadow actors attached to other actors? I am able to do it with an initially placed actor on the stage but not a spawned actor.
In theory it should work like a parent/child scenario but I don't think GS allows children to see the parents without global variables set?
Ideally I want to spawn in the parents and have the parents spawn their shadow actor children without relying on global variables.
Thanks.
In theory it should work like a parent/child scenario but I don't think GS allows children to see the parents without global variables set?
Ideally I want to spawn in the parents and have the parents spawn their shadow actor children without relying on global variables.
Thanks.
Comments
Before we discuss solutions though, just be aware that shadow Actors will kill the processor because they require Constrains to work. Each shadow will need between 1 and 3 constrains. You will have to constrain the X position, the Y position, and the Rotation of the "parent".
If you are only targeting the iPad or the iPhone4, you might be able to get away with it. But even just one shadow on one actor will kill the FPS of an older device.
If it is necessary for the gameplay - like the shadow in Zaxxon to determine the ship's height - that's one thing. But if it is just for aesthetic reasons, I highly advise against it. The older devices simply cannot handle it.
I have a shadow on an Actor like that in my current game, but there is nothing else going on in the Scene.
You say that you have a shadow working, have you tested it on an older device?
I am assuming the constrains are the issue and not neccessarily the file size granted the file size is reasonable.
Before I needed to shoot at mouse pointer while scrolling the background. You gave me advice and it worked. The formula was vectoangle((mouse.x+cam.x)-self.x,(mouse.Y + cam.Y)-self.y)
Oddly enough I can't use this formula to rotate to the player during scrolling. Basically I replaced the mouse.x and y with the player.x and y global constraint variables. It works in the initial screen but as soon as I scroll its done for. Help on that would be much appreciated