Jump to content

Recommended Posts

Posted

hi, im trying to make a custom render for a block that has parts rotating while its active (much like a mill in a windmill). so far i have got it to render, but i cant figure out how to do the rotations. atm, it is either always rotating, not rotating or if one rotates all other blocks of the same type rotate. can anybody help me? here is the code = (sorry, its very messy)

 

BlockGrinder:

 

  Reveal hidden contents

 

 

TileEntityGrinder:

 

  Reveal hidden contents

 

 

RenderGrinder:

 

  Reveal hidden contents

 

 

ModelGrinder:

 

  Reveal hidden contents

 

Posted

You should look up how the vanilla beacon does it. The best way to do this is to use math (Sin and Cosine) and offset your x, y, and z positions accordingly. If you don't know basic geometry to be able to do this, now's a better time than ever to learn.

width=336 height=83http://img836.imageshack.us/img836/1237/cooltext624963071.png[/img]

I make games, minecraft mods/plugins, and some graphic art.

 

Current Project: LoECraft - An industrial minecraft server with its own modpack and custom launcher.

Posted

As this is a techne model you can just add offset to the Cubes and then make them rotate around the blue ball you see in techne using "setRotationAngles" Function.

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Posted

thanks for the help but that inst exactly what im after. the block is similar to a furnace, so when the block is active i want part of the model to be moving, however every other block using the model, that isnt active also moves.

Posted
  On 4/29/2013 at 8:28 PM, GhostSnyperRecon said:

thanks for the help but that inst exactly what im after. the block is similar to a furnace, so when the block is active i want part of the model to be moving, however every other block using the model, that isnt active also moves.

 

You need to translate the cube in the Model file, not in the render file.

like (warning: pseudocode!):

GLPushMatrix()
GLTranslate(X, Y, Z)
cube.render(par1Float)
GLPopMatrix()

 

How to get the value into your Model file? Add a variable in your model class and set it in the render file.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

  Quote

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

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.