Aller au contenu

Photo

Flipping objects upside down ingame


  • Veuillez vous connecter pour répondre
7 réponses à ce sujet

#1
kamal_

kamal_
  • Members
  • 5 238 messages

Spiderman, spiderman, does whatever a spider can...

 

Youtube demo video below:

 

https://youtu.be/7XpvNrPn8U8

 

code by crom_nwn2 on the nwvault irc channel. I altered the demo code to flip the pc instead. You can't set object scale to a negative value in the toolset, but you can do it ingame...

 

Demo module by crom_nwn2 can be found here: https://owncloud.thi...P6FgYMl8vkK4ugQ



#2
Tchos

Tchos
  • Members
  • 5 030 messages

Great idea!



#3
kamal_

kamal_
  • Members
  • 5 238 messages

Great idea!

All credit/kudos should be for crom, as the object flipping idea and the code itself is his. I merely made the demonstration video and got his permission to share.

 

Before anyone asks:

This code does not allow turning things on their side, no arbitrary orienting things.

The walkmesh is not affected when you do this.

I didn't try flipping the area itself upside down. However the script will flip objects and the area is an object....  (if your pc bursts into flame trying this it's not my fault)



#4
Tchos

Tchos
  • Members
  • 5 030 messages

I'm pretty sure the scale command doesn't apply to areas.  Anyway, I would praise Crom for the idea, but Conan told me that Crom doesn't listen or care about praise.  "What use to call on him? Little he cares if men live or die. Better to be silent than to call his attention to you; he will send you dooms, not fortune!"


  • GCoyote, PJ156, ColorsFade et 1 autre aiment ceci

#5
rjshae

rjshae
  • Members
  • 4 478 messages

What about setting a negative scale along the X or Y axis? Does it flip the animation so you could, say, have a left-handed swordsman?



#6
kamal_

kamal_
  • Members
  • 5 238 messages

What about setting a negative scale along the X or Y axis? Does it flip the animation so you could, say, have a left-handed swordsman?

The demo module lets you reverse x,y, and z separately with a lever for each. The answer is yes but.... (you get a monstrosity as the creature model isn't exactly designed for it). If you flip both x and y the model looks normal but moves backwards, Michael Jackson moonwalk style.

 

I'm pretty sure the scale command doesn't apply to areas.

You have code for work with tiles, you could test flipping the tiles I suppose? I gave the area a try and it just failed, but my computer also didn't burst into flames.



#7
Tchos

Tchos
  • Members
  • 5 030 messages

You have code for work with tiles, you could test flipping the tiles I suppose? I gave the area a try and it just failed, but my computer also didn't burst into flames.

 

You mean my "tile magic" reimplementation?  That's true, it might work with that to flip tiles upside down, since they're objects on their own and not the area itself.  I'll test it out.



#8
Tchos

Tchos
  • Members
  • 5 030 messages

Well, I wrote a script to test it on tiles (I didn't check the demo module you posted, but I assume it just uses SetScale with a -1 Z-scale, so that's how I did it), and it flips the tiles like anything else, but since the origin point is the bottom, it flips it under the ground, just as what we saw with the PC.  The bottom of the tile I used (the Sunken Fortress) was opaque, so you can't see through it, and the camera won't go under the walkmesh in any case, so you'd have to carefully design your area with open spaces to work around those issues.