Jump to content

Recommended Posts

Posted (edited)

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

2018-04-20_13.07.00.png

Edited by Setrion
Title changed
Posted

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/

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.