Ok, bit of Maths help if you please. Target the end of a shape.
StormyStudio
United KingdomMember Posts: 3,989
Working on my 2 week project 'Escape Artist'.
I'm struggling to find the right set of rules to achieve what I need.
I've got a setup so an actor needs to follow the path you draw. As it arrives at the last part of the drawn line, it travels half way along the last actor. I want it to travel all the way along the last actor to the end. Rather than to the middle.
How can I find the furthest right X and Y position of an actor that is rotated to an unknown angle,
e.g. A line with a width of 100 pixels is rotated clockwise 42 degrees. How do I find the x and y position of its furthest right point at the end of the line.
Its probably using 'VectortoAngle', 'selfwidth/2' , self position X, self position Y... I just cant get it right...
Many thanks for any help...the game although simple should hopefully be quite addictive.
(I've used my own set of rule to create the tracking of the drawings, and recently changed it from spawned dots to lines after looking at Orbz great line drawing demo..)
I'm struggling to find the right set of rules to achieve what I need.
I've got a setup so an actor needs to follow the path you draw. As it arrives at the last part of the drawn line, it travels half way along the last actor. I want it to travel all the way along the last actor to the end. Rather than to the middle.
How can I find the furthest right X and Y position of an actor that is rotated to an unknown angle,
e.g. A line with a width of 100 pixels is rotated clockwise 42 degrees. How do I find the x and y position of its furthest right point at the end of the line.
Its probably using 'VectortoAngle', 'selfwidth/2' , self position X, self position Y... I just cant get it right...
Many thanks for any help...the game although simple should hopefully be quite addictive.
(I've used my own set of rule to create the tracking of the drawings, and recently changed it from spawned dots to lines after looking at Orbz great line drawing demo..)
Comments
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
X is the same thing but with cosine.
Not sure if I understood clear though, so this may be not possible depending on how you're handling everything. Math is cool too, but I prefer to use one system for everything, without mixing xP
@asymptotell I'll give that a go at lunch today., thanks very
Much. I need to brush up on my sin and cos, I started watching some khan academy on youtube, just news to remember what I hear. :-)