2DWorlds Forums
4/15/11 - Printable Version

+- 2DWorlds Forums (http://2dworlds.buildism.net/forum)
+-- Forum: 2DWorlds (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=4)
+--- Forum: News (http://2dworlds.buildism.net/forum/forumdisplay.php?fid=8)
+--- Thread: 4/15/11 (/showthread.php?tid=3374)



4/15/11 - Jacob__mybb_import1 - 04-15-2011

  • Using welds no longer breaks FixedRotations
  • Optimized the explosions a bit. I unintentionally fixed rocket jumping while doing this, but it's a little bit overpowered!
  • Added traces! Traces allow you to draw an invisible line from a point in the world and find the first part it collides with.

There are 2 ways to use traces:

[lua]Character:getTrace() --finds the part the character's arm is pointed at, useful for tools[/lua]

[lua]World:getTrace(Vec2D startPos, number angle) -- traces from the specified point in the world[/lua]

Both of these functions return a TraceResult object, which has the following properties:
  • part
  • start (Vec2D)
  • end (Vec2D)
  • distance (Vec2D)

If someone wants to add the info on traces to the wiki, that would be good!


RE: 4/15/11 - Anti - 04-15-2011

Nice!
But anyways, i cant open games or profile, and community says database error Tongue
Created the getTrace page on wiki Smile
http://buildism.net/wiki/w/index.php?title=GetTrace
Please tell me if i put wrong information there! =D


RE: 4/15/11 - Mazzyandmilk - 04-16-2011

YOU REMOVED ROCKET JUMPING?


RE: 4/15/11 - Anti - 04-17-2011

Hm, "TraceResult" does not have a property called "end"... That what it says to me Q_Q