Posted April 20, 20187 yr Hey guys, i've got a question I'm trying to make a Zombie Pigman Boss, most of you will know him from "Take back the night" from Captian Sparklez, and i will try to code him into Minecraft The Question is, is it possible to make the Boulder on the chain to an own "entity" so it will be effected by gravity & players have the ability to destroy it? I think this can be done, but i don't know how, and i don't know where i can look to take some ideas Edited April 20, 20187 yr by Setrion Title changed
April 20, 20187 yr Well, it just takes some math. Obviously the position will need to be relative to the pigman holding the chain. After that it is physics. I would probably code it using standard physics ideas. Like I would have a field for the chain's "force". The boulder would move freely until its distance is equal to the length of the chain at which point the chain will exert force in the direction of the tight chain. I would probably "cheat" the physics a bit when starting an attack -- like I would have the pigman start spinning and automatically give the boulder some lift and rotational motion, but then use physics after that. When the chain is tight, you can use vector dot product to help eliminate any outward motion. An alternative way, maybe simpler if you're not strong in physics, is to plan out the motion with an array and step through it like a standard animation. However, you would also check for collisions and when those happen you'd revert to physics calculations. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
April 22, 20187 yr Author Puh.. that sounds a little bit confusing to me But i'll try it, i think i can do it this way, but it's not so easy
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.