
Swingdoll Engine
玩家
0
評分
4.5★
遊戲分類
Educational
關於
Swingdoll Engine. This is some form of ragdoll. It's not as cool or amazing as a real ragdoll, but with a normal ragdoll, when you move it back and forth, it just shakes around, but when you move THIS back and forth, it swings! Kinda buggy though. Mess around with the vars to get better swingdollness. And the best part is, its EXTREMELY customizable! You can animate it, do whatever you want. But the registry point is where it swings around. AND YES! THERE WILL BE UPDATES! hopefully one where you can swing around each joint seperately, but I gave the main code to perhaps it's possible if you want to edit it differently, or build it differently. First and foremost, it gets the x and y pos of the mouse, so perhaps you can edit that to a different point! :D THE SWINGDOLL WILL BECOME THE NEW RAGDOLL EVENTUALLY! MARK MY WORDS! Flash not working? Paste this code into a movie clip. No other code needed: onClipEvent (load) { rot = 0; _rotation = rot; weight = 3; inertia = (rot/10)*weight; speed = 0; friction = .9; arrx = new Array(); arry = new Array(); arrx.push(_x); arry.push(_y); } onClipEvent (enterFrame) { arrx.push(_x); arry.push(_y); arrx.shift(); arry.shift(); speedd = 1; _x = _root._xmouse; _y=_root._ymouse Xdistance = (arrx[0])-_x; Ydistance = (arry[0])-_y; if (Xdistance !== 0) { radAngle = Math.atan2(Ydistance, Xdistance); rotata = int((radAngle*360/(2*Math.PI))+90); rotat = 180-rotata; updateAfterEvent(); } else { rotat = 0; } defaultt = rotat/-10; inertia = (rot/10)*weight; speed -= inertia-defaultt; speed *= friction; rot += speed; _rotation = rot; } and feel free to edit this code however you want. Supposedly make it attach no another part of the swingdoll, and create separate joints. This is just a basic engine, so you can do whatever you want. Let's see what you can do! :)
創作者
S-S-X
遊戲工作室
分類
Educational
類型
小遊戲
發佈日期
最近
玩家
0
S-S-X 的更多作品
更多 Educational 遊戲
你可能也喜歡
其他玩家最近最愛玩的熱門遊戲。