Jump to content


Alignment of object to ground

alignment math ground height angle

  • Please log in to reply
No replies to this topic




  • Members
  • PipPipPip
  • 349 posts

I have a platform which is thin and round, big enough for the player to just stand on.  I want the player to be able to summon it which I can do with moveto or placeatme 

However depending on where I am standing say the platform will be tilted part in the ground or in a wall even.   How can I call an object that will fall flat on the ground and not collide with other objects ?  



I know maybe there is fancey math like 


Actor PlayerRef = Game.GetPlayer()
Portal.MoveTo(PlayerRef, 120.0 * Math.Sin(PlayerRef.GetAngleZ()), 120.0 * Math.Cos(PlayerRef.GetAngleZ()), PlayerRef.GetHeight() - 35.0)


But this is way above the ground and suspends the object in mid air, if I play with the numbers I can get the object close to the ground but then it is not always


level and sometimes is tilted into the ground.     


Any Idea's ?




Also tagged with one or more of these keywords: alignment, math, ground, height, angle

Page loaded in: 1.010 seconds