Rotate actor around z axis?
Lokitoes
Member, PRO Posts: 187
Is is possible to make an actor spin around the z axis? Or fudge it to make it look like this is what it is doing? For example, as angular rotation makes an actor spin clockwise or anticlockwise, is it possible to have a similar form of rotation on a horizontal-style z axis?
Cheers,
A
Comments
@Lokitoes Gamesalad can't do 3D. However you can use this code to make it look like it rotates on the Z axis:
50*sin( game.Time *400)+50
this is for an actor with the size of a 100 pixels wide, the 400 represents the speed.
if your actor is 50 pixels wide it would look like this
25*sin( game.Time *400)+25
, so the 25's are the total width/2Cool! That was the kind of cheat I was looking for, thanks
@Approw -- nice solution!
Interesting concept - so what is the behavior used, rotate, or other?
My Blog / App Store / Google Play
@mhedges You just Constrain Attribute self.Size.Width to the expression posted above.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
@tatiang, thanks much. I will test it on some actor like a coin or a plane to see what it looks like.
My Blog / App Store / Google Play