Rotate actor around z axis?

LokitoesLokitoes 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

  • ApprowApprow Member Posts: 703
    edited April 2015

    @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/2

  • LokitoesLokitoes Member, PRO Posts: 187

    Cool! That was the kind of cheat I was looking for, thanks :)

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @Approw -- nice solution!

  • mhedgesmhedges Raised on VCS Member Posts: 634

    Interesting concept - so what is the behavior used, rotate, or other?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited April 2015

    @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

  • mhedgesmhedges Raised on VCS Member Posts: 634

    @tatiang, thanks much. I will test it on some actor like a coin or a plane to see what it looks like.

Sign In or Register to comment.