Jump to content



Photo
- - - - -

Rotate model at runtime via script


  • Please log in to reply
3 replies to this topic

#1 yamyam

yamyam

    Hobbyist

  • Members
  • PipPip
  • 33 posts
  • Location:Black Country,England,UK

  • Flag: England

  • Favorite Pinball: Tuten Kham

Posted 13 October 2011 - 02:26 PM

Hi all

Normally i dont ask for help i find solving the problem is half of the fun of making a table.
But i am stumped with this one, i have created a model that i need to rotate x degrees at runtime via scipt, and
cant for the life of me find a command that works. or a thread that covers this one.

What i need to know is, what is the best object usinf FPM to save the model as.
and what is the script command to rotate it by x degrees.

Sub trigger1_Hit()

RotateModel. x degrees
End Sub

Please see screenshot below
There must be a way any help would be appreciated.


Tables Created: Bally Bikini (Bingo), Bally Beach Club (Bingo), Bally Big Show (Bingo) Captain Pugwash (of the caribbean) (WIP)

#2 unclewilly

unclewilly

    sofa king.....

  • VIP
  • 5,191 posts
  • Location:Baltimore, Maryland

  • Flag: United States of America

  • Favorite Pinball: tz, tom, big hurt, who dunnit



Posted 13 October 2011 - 03:09 PM

If you saved the model as a spin disk or a rot target you could rotate it by degrees

"it will all be ok in the end, if it's not ok, it's not the end"
 
Monster Bash VP10 WIP https://dl.dropboxus... (vpx)WIP15.vpx

uw2.gif


#3 yamyam

yamyam

    Hobbyist

  • Members
  • PipPip
  • 33 posts
  • Location:Black Country,England,UK

  • Flag: England

  • Favorite Pinball: Tuten Kham

Posted 13 October 2011 - 05:06 PM

QUOTE (unclewilly @ Oct 13 2011, 04:09 PM) <{POST_SNAPBACK}>
If you saved the model as a spin disk or a rot target you could rotate it by degrees


Thank you for quick reply unclewilly i have already tried

Spin disk this seems to flatten my model to a disk

and

Roto Target adds targets to the outside of the model deforming it.

Those two where the objects i tried first because of there rotate property..
Tables Created: Bally Bikini (Bingo), Bally Beach Club (Bingo), Bally Big Show (Bingo) Captain Pugwash (of the caribbean) (WIP)

#4 ianski

ianski

    Enthusiast

  • Members
  • PipPipPip
  • 67 posts
  • Location:UK

  • Flag: United Kingdom

  • Favorite Pinball: escape from monkey island

Posted 13 October 2011 - 09:16 PM

QUOTE (yamyam @ Oct 13 2011, 03:26 PM) <{POST_SNAPBACK}>
Hi all

Normally i dont ask for help i find solving the problem is half of the fun of making a table.
But i am stumped with this one, i have created a model that i need to rotate x degrees at runtime via scipt, and
cant for the life of me find a command that works. or a thread that covers this one.

What i need to know is, what is the best object usinf FPM to save the model as.
and what is the script command to rotate it by x degrees.

Sub trigger1_Hit()

RotateModel. x degrees
End Sub

Please see screenshot below
There must be a way any help would be appreciated.



Looks good!

It might be best to do it as a toy so you can rotate and move it anywhere you like,
and use invisible droppable walls to guide the ball where you want to (as movng a toy doesn't move the collision shape with it).