ChainSaw Incident

belleechbelleech Member Posts: 34
edited November -1 in Working with GS (Mac)
Hi

I got this formula from the chainsaw demo. game.IRXPosition +cos( game.IRRotatorAngle %360)*60. This works great, I was able to put the shield on my Main actor and rotates flawlessly. One thing im stumped though, this math right here puts the shield on the East side of the Main actor. BUt the thing is, the main actor accelerates North Bound and with this the shield stays east. I know theres gotta be a change on the math I need to do but I am just stumped on this one. Any ideas?

Regards.

Comments

  • rebumprebump Member Posts: 1,058
    So you are using the X/Y equations for the shield positioning. Are you setting the shield's rotation value with anything?

    Not seeing your project, I still wonder if it would just be easier for the ship actor, upon some event (pressing the shield button/key), you just spawn an actor with an "actor" relative X/Y position and a matching rotation value (assuming when both actors are in your actor palette, they both face the same way).

    I suggested those demos based on CodeMonkey suggest the use of the cos/sin rotation stuff.
  • belleechbelleech Member Posts: 34
    No unfortunately rebump, GS doesnt really work that way. When you do the relative XY position, it doesnt work with the rotation value. What usually happens is the Shield just rotates in place and doesnt rotate around the Main actor which I need. I think I got this formula going for sure but I cant seem to figure out how to put the shield to be always Northside of the main actor instead of East side.
  • rebumprebump Member Posts: 1,058
    Yeah, forgot you don't have the "relative to actor" v "scene" when constraining. :-)

    So what do you have in the shield's rotation? Just a value? Or an expression and if so, what?
  • rebumprebump Member Posts: 1,058
Sign In or Register to comment.