Jump to content

Having Trouble With Prefab Rotation When Placed On Ground


Zackrb7

Recommended Posts

I'm trying to have a 2.5d looking object look like one plane is always facing a certain direction. Let's say it's a simple wall for convenience. I'm having trouble keeping a plane of the wall always face, say, North, so essentially the wall would look like its orientation doesn't rotate when you rotate the camera and like it stays in the orientation it is placed. I've looked into the script for farmplots because that's a similar thing I want to emulate, but that script calls up many different images independently from the farm_decor TEX, like rocks and fence posts and are all placement defined for orientation on what I assume is the x and y axis. It's been confusing me and there has to be an easy way I just can't see right now. Any suggestions would be very helpful.

Link to comment
Share on other sites

You want what? For starters, 2.5 D is nonsense when talking mathematically.

 

I assume you want something like creatures having a front, back and two sides? There's a function called "SetFourFaced" that manipulates the animation used in a weird way that's totally opaque to me, but it works somehow.

 

EDIT: the pig king does stuff with camera orientation. If you know faintly what Sinus, Cosinus and Tangens (and their respective arcus-thingies) are, you should check out the whole chunk of code.

 

TheCamera:GetDownVec()

Link to comment
Share on other sites

Thank you for the response. Sorry for my poor use of words. I'm still learning and I don't know the proper names for most things, so I use what sounds like it fits- which I'm sure is just really confusing. Doesn't the the Pig King's sprite face camera? To clarify on the original post, my goal is to have a prefab which has a different look at each camera rotation because it isn't square. Like a wall that looks static in 3d space, stuck to where it is originally placed. The same look that would happen if you placed 6 blocks of wall attached to each other in a straight line, but as one entity.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...