Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

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/

  • Author

Puh.. that sounds a little bit confusing to me :D
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.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.