Forum rules - please read before posting.

Placing animated object within an animated object - position issue

Hi,

I have bubbles coming out of a fish, and the fish is on a path, with the whole sprite turning from left to right, but I need the bubbles to always be coming out of the front of the fish (ie the head), but when the sprite turns they are still only coming out from one end and do not flip round.

Any way I can easily do this?

Thanks!

Comments

  • edited November 2015
    Bubbles coming from a particle emitter? Or animated sprite sheet(atlas)?
    Is it childed to the fish?

    Try to set new position to the bubbles when turns occur.
    If bubbles are animated sprite sheet. Try to make a copy of it and set opposite position and then call object visibility on and off left and right bubbles  when fish turns.
  • It is a bubble with a transform position component
  • edited November 2015
    You should try animating the bubble as part of separte fish swim left/right animations.  Unity Animations can animate transforms as well as sprites within the same clip.
  • I'm having a feeling the bubble is a part of the game play.  It's a single bubble that you interract with and not just a random visiaul element, am I right?
  • The bubble is actually just a visual element, but I am unsure how to add it to my left right fish swim animation. 

    When I do add it it seems that I cannot animate it seperately to the fish? I want three bubbles coming out from the fish, swapping between both ends depending on direction of fish, and for each bubble to position transform differently.

    I currently have it as laid out in these screenshots.

  • edited November 2015
    Create all your animations in separate ainmations with their own animators.
    You should have 4 animations and 4 animators.
    Fish swims left, swims right, bubbles left , bubbles right.


    Then child and position bubbles left to fish swims left accordingly to the head. Do the same with Fish swims right and bubbles right.
    After you can call what animations you want to play with your actionlists. And set positions to where you want your fish move or just move it if it is a Player.

    If your fish is not a Player or NPC e.g. just fish that swims back and forth and has nothing to do with the gameplay.
    Then you can create 1 fish swims animation and 1 bubbles animation.
    In total this time you would have 2 animators and 2 animations.

    Add  your fish swims sprite sheet animation(atlas) and set positions where it moves .
    If left add fish swims left sprites, when it turns add fish right sprites ( add turn animation sprites if you have them, if you dont have them , you would need to flip it's Roatation Y by 180 degrees or Scale it's X to -1  )

    If you make it as a loop make sure to add your sprites correctly so you have a nice seamless loop.

    Then add sprites of your bubbles animations and animate them( this is gonna be a bit of work  if you have only 1 bubble and want it to be animated e.g. fade it in go up ad fade out or burst, that's why to go with a particle emmiter would have been better)

    Remember to set the same animation length to the fish swims and bubbles!

    After you bubbles animation is set child it to you fish and position it to it's head, then add 2 more new positions chnage it slightly and move to fish's head when you fish tunr on the left and on the right.

    This is actually a Unity related issue and not AC. By all means you are free to post it here. Just take into account that in Unity forum you could get better answer.
     
    Can't see your picture since dropbox asks to log in.

  • Thanks for this, I am stil struggling a a little tbh but will let you know how I get on.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.