News Forums Troubleshooting Look Directionn For Sprite Based Models

Tagged: ,

This topic contains 4 replies, has 2 voices, and was last updated by  ChaosD 1 year, 2 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5489

    ChaosD
    Participant

    Hello everyone!
    Iam currently getting to know Unity better by prototyping a small 2d game. I have played around with Rain:Indie and already enjoyed your active support on the old forum (is there a chance that i can use my old account here too?)

    When i started putting some AI on my sprite based monsters, it occurred to me that Rain makes my monster look at its target. Since Rain is tailored to a 3d environment, would that mean that it would just flip my sprite up by 90 degree and make it face the target? It should always face up to the camera and just rotate towards the target.

    What would be the best approach for this?

    • This topic was modified 1 year, 2 months ago by  ChaosD.
    #5560

    prime
    Keymaster

    Is your 2D game set as an XZ plane game looking down the Y axis?

    #5568

    ChaosD
    Participant

    exactly!

    #5572

    prime
    Keymaster

    I’m guessing you just need to rotate the base model so that it faces the camera and looks correct with regard to forward direction. For example, if the 2D view was intended to look like the profile of a person, you would rotate the model so that it was mounted sideways with regard to the x/z plane (i.e., looking at it from a 3D view it would be lying on its side) and then rotate the model around the y axis so that it faced correctly. From RAIN’s perspective, it will be dragging the model sideways, but that’s just fine.

    Of note, I haven’t played with the Unity 2D stuff, so I don’t actually know how you mount a 2D model (sprite) to a game object in the 3D world. Even so, I suspect something similar to what I’m suggesting will work.

    #5576

    ChaosD
    Participant

    i think i get it. i´ll give it a try - thank you!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.