#How can I make an entity snap to rail direction?

1 messages · Page 1 of 1 (latest)

spark venture
#

I am trying to make a minecart-like entity and it will travel on rails, but won't face in the direction of the rail like minecarts will.

spark venture
opaque seal
#

Did you also copy the animations?

#

try to add the runtime_identifier

spark venture
#

I don't have any animations for this entity

opaque seal
#

try to add the runtime_identifier

#
    "format_version" : "1.8.0",
    "animations" : {
        "animation.minecart.move" : {
            "loop" : true,
            "bones" : {
                "bottom" : {
                    "position" : [ "variable.rail_offset.x / query.model_scale", "variable.rail_offset.y / query.model_scale", "variable.rail_offset.z / query.model_scale" ],
                    "rotation" : [ "variable.hurt > 0 ? -Math.sin(variable.hurt * 360 / (Math.pi * 2)) * variable.hurt * (((20 * 2 - query.structural_integrity) - query.frame_alpha) < 0 ? 0: (20 * 2 - query.structural_integrity) - query.frame_alpha) / 10 * query.hurt_direction : 0", 0.0, "-variable.rail_rotation.z" ]
                }
            }
        }
    }
}```
spark venture
#

Will try, thanks

opaque seal
#
  "format_version": "1.10.0",
  "minecraft:client_entity": {
    "description": {
      "identifier": "minecraft:minecart",
      "min_engine_version": "1.8.0",
      "materials": {
        "default": "minecart"
      },
      "textures": {
        "default": "textures/entity/minecart"
      },
      "geometry": {
        "default": "geometry.minecart.v1.8"
      },
      "scripts": {
        "pre_animation": [
          "variable.hurt = query.hurt_time - query.frame_alpha;"
        ],
        "animate": [
          "move"
        ],
        "should_update_effects_offscreen": "1.0"
      },
      "animations": {
        "move": "animation.minecart.move"
      },
      "render_controllers": [ "controller.render.minecart" ]
    }
  }
}```
#

Although first I would try adding the runtime_identifier

spark venture
opaque seal
#

no

spark venture
#

ok

#

The minecart now will only face in the +Z direction

#

After testing, the model is the thing that isn't moving

opaque seal
#

try adding the runtime_identifier

spark venture
#

I did add it to the server entity file