Isometric objects direction while moving
prajwal.be.21

Hey,

So I want to set a one-frame animation sprite to an isometric object (car) and have named it 'Drive_iso_nw' in animation. The initial frame starts with Idle_iso_sw. I want to move the directions in just the 4 diagonal ones. I thought that the engine will pick up the appropriate animation state if I named it with the convention used on example isometric project.

I noticed you also can't set direction while moving. Am i missing something with the name? Please help...

All 3 Comments
Gio

Hi

The thing that is responsbile for changing animations based on the current isometric direction is the IsoCharacter (or IsoActionCharacter) behavior.

The purpose of that code is to take care of the common things that "characters" would do in an isometric world, so it handles things such as walking and idle animations.

A vehicle is only slightly different to a character, but I think I would not use the same IsoCharacter behavior. In fact, I think the best course of action here would be to duplicate that isoCharacter.js file and edit it to create your own IsoVehicle behavior. It would be very similar, but not identical. You'll probably want to replace the Walking animation names with your own Driving animation names, and probably make more changes further down the line.

prajwal.be.21

Thanks, I still am trying to imnplement 'Drive' feature instead of 'Walk' in isocharacter.js. But I have a doubt, instad of 'Drive_iso_nw' can I just name the animation 'Walk_iso_nw'? I did that, but it did not work.Should we add all four directions for this to function well?

prajwal.be.21

Apologies, I was creating a new car object and that did not have animations like the one in the editor did. Got it working the way I desired. Thanks Gio!

Post a reply
Add Attachment
Submit Reply
Login to Reply