Sign in to follow this  
Dark Dragon

Object Scale

Recommended Posts

Hi there,

as many of you should know now i love mapping and so my suggestion is that you should be able to scale the objects in the mapeditor... i have no idea if this is possible but there are already many things that seemd to me nearly impossible :D

thank you

Share this post


Link to post

if you payed attention to the PoTD you'd know object scaling is possible ;)don't know about collision

Share this post


Link to post
mhh ive just seen the scale of players. could you show me the picture you mean?

nope, scaling players is not possible, that was a player model converted to an object actually :P

Share this post


Link to post

It's really easy to scale objects already - the only problem is that the collision-data for the object stays the same size... so, you could put a massively huge wheelchair on top of a building, but if someone flew into it with a helicopter they wouldn't hit anythign until they reached the very tiny center of the object.... Or, you could shrink a massively tall building down to a size that would fit into your pocket, but if you tried to walk up to it you'd hit the building walls long before you got close enough. (unless you turned its collisions off completely, which is also possible.)

Anyhow, it can all be done, but has to be done clientside... easiest would be to do the following:

in your map file, specify something like scale="2.0"

when you load objects from a map file, use setElementData() to set a property "scale" on the object to 2 (the value that was in your map file)

use clientside onElementStreamIn event, check if what's being streamed in is an "object" and if getElementData "scale" isn't false, setObjectScale() to that numeric value...

optionally, setElementCollisionsEnabled to false for the object if "scale" does not equal 1.0

But, like i said, you run into the collision-data problem mentioned above. Also, it wouldn't be hard to edit any of the scripted map editors to give the option to setObjectScale of whatever item you're playing with...

Share this post


Link to post
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.