#How can I make an entity snap to rail direction?
1 messages · Page 1 of 1 (latest)
I don't have any animations for this entity
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" ]
}
}
}
}
}```
Will try, thanks
"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
Would I need an animation controller for this?
no
ok
The minecart now will only face in the +Z direction
After testing, the model is the thing that isn't moving
try adding the runtime_identifier
I did add it to the server entity file