Rotating issue. Making a non controlled actor rotate in direction of movement.

ToonshackToonshack Member Posts: 53

Hi guys,
I'm an illustrator, who has finally bitten the bullet and decided to learn game salad and start making my own games.

Anyway, I've been doing lots of reading, but love to dissect things rather than just read things.
Anyway I purchased the sheep herding template, which has taught me loads already. Anyway, one thing I just cant seem to figure out (or find online). Is how to make an actor (who is being repelled by a player controlled actor) rotate into the direction of travel. I have only managed to get a degree of rotation as a response to collision.

Any help or direction towards the right tutorial would be great.

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    Constrain Rotation to:

    vectorToAngle( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y )

  • SocksSocks London, UK.Member Posts: 12,822

    . . . or for a smoother turn:

    Rotate to Angle:

    Angle vectorToAngle( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y )

    Speed 100

  • ToonshackToonshack Member Posts: 53

    I'm afraid this confuses me profusely lol. Looks like I still have a lot of learning to do :)

  • SocksSocks London, UK.Member Posts: 12,822

    @Toonshack said:
    I'm afraid this confuses me profusely lol. Looks like I still have a lot of learning to do :)

    If you have any questions ask away !

  • ToonshackToonshack Member Posts: 53

    @Socks said:
    Constrain Rotation to:

    vectorToAngle( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y )

    Essentially the second part beginning with Vector to angle lol. Would these be custom attributes for the constrain rotations?

  • ToonshackToonshack Member Posts: 53

    So I have gotten rotate to angle, then vector to angle x and y. I tried collision as a condition, but both actors simply freeze.

  • SocksSocks London, UK.Member Posts: 12,822

    @Toonshack said:
    So I have gotten rotate to angle, then vector to angle x and y. I tried collision as a condition, but both actors simply freeze.

    Not sure what that means, can you show me the rules you are using ?

  • JapsterJapster Member Posts: 672
    edited October 2016

    Once again, I got pointed towards this thread as @Socks is already answering, or has answered, my questions before I had them, via helping someone else!

    11,000+ posts? a lot of which are extremely useful, and a massive help to the community?! (and the others being incredibly entertaining!... :smiley: )

    @ForumNinja - Seriously, a few people (@Socks,@Armelline, @RThurman, @StormyStudio, etc) help us new and fledgling devs out a HUGE amount, and seriously? - I'd have probably torn my hair out and given up without their amazing help and support, a LONG time ago...

    Can these guys not be given a special status / 'Unofficial GS Support Team' discounted sub/rate or some other token, as a show of appreciation for what they do? - If not, I'd gladly put towards a pot to achieve the same result... :smiley: Kind of selfish reasons too though - I NEVER want these guys to leave the community, I'd be lost!... :wink:

Sign In or Register to comment.