WallCrawler
3 posters
RigidChips :: Rigid-Chips :: Files :: Cars
Page 1 of 1
WallCrawler
I've tried this before, but I could never get it to work. I think I figured out a way to get it to work okay now. You need to turn off gravity, although I might be able to get it to work with gravity.
If you run into a wall (slowly), you can climb up it. If you run off a cliff (slowly), you'll most likely be able to drive down it. And if you make sharp turns, you'll most likely not spin out of control and start slowly flying through the air.
If you run into a wall (slowly), you can climb up it. If you run off a cliff (slowly), you'll most likely be able to drive down it. And if you make sharp turns, you'll most likely not spin out of control and start slowly flying through the air.
- Code:
Val
{
Handle(default=0,min=-20,max=20,step=5)
Engine(default=0,min=-5000,max=5000,step=5000)
FEngine(default=0,min=-5000,max=5000,step=5000)
NorthJet(default=0,min=-100000000)
SouthJet(default=0,min=-100000000)
Brake(default=0,min=-100000000,step=100)
}
Key
{
0:Engine(step=5000)
1:Engine(step=-5000)
2:Handle(step=-2)
3:Handle(step=2)
}
Body {
Core(){
N:Trim(spring=0.1,damper=0.1){
N:Rudder(angle=Handle,name=FRONT){
W:Jet(power=NorthJet){
W:Wheel(option=1,angle=90,power=-FEngine){
}
}
E:Jet(power=NorthJet){
E:Wheel(option=1,angle=90,power=FEngine){
}
}
}
}
S:Chip(){
W:Jet(power=SouthJet){
W:Wheel(option=1,angle=90,power=-Engine,brake=Brake){
}
}
E:Jet(power=SouthJet){
E:Wheel(option=1,angle=90,power=Engine,brake=Brake){
}
}
}
}
}
Lua
{
function OnInit()
v = 0
end
function OnReset()
OnInit()
end
function OnFrame()
v0 = v
v = _VZ(0)
dv = v-v0
SOUTHJET = -10000
if _VY(FRONT) < -0.5 and _TICKS() > 100 then
BRAKE = 1000
NORTHJET = -20000
SOUTHJET = -20000
elseif ENGINE > 0 and v > -1 and dv > -0.2 then
NORTHJET = -1000
FENGINE = ENGINE
else
NORTHJET = -10000
FENGINE = ENGINE/10
end
end
}
DanielLC- Tank
- Posts : 78
Join date : 2010-10-23
Re: WallCrawler
This is similar to something I made a while back but I never posted. I spent quite a lot of time on it and eventually got it to work moderately well. The biggest thing I found that helps get on walls and over ledges is a button to kill the jets until the car gets to where you want it to be.
Here is the model I designed if you want to take a look at it:
Here is the model I designed if you want to take a look at it:
- Code:
// [RCD]
Val
{
BRAKE(default=0, max=10000)
CHANGE(default=0, max=1, step=1)
FOLD(default=20, min=20, max=40, step=1)
GO(default=0, min=-10000, max=10000, step=10000)
HANDLE(default=0, min=-30, max=30, step=4)
JET(default=0, min=-10000, max=80000, step=80000)
JET2(default=0, min=-40000, max=40000)
}
Key
{
0:GO(step=1000)
1:GO(step=-1000)
2:HANDLE(step=2)
3:HANDLE(step=-2)
4:JET(step=10000)
5:BRAKE(step=-10), JET(step=-10000)
6:CHANGE(step=1)
7:FOLD(step=1)
8:BRAKE(step=10000)
9:BRAKE(step=-10000)
}
Body
{
Core() {
E:Jet(power=JET2) {
E:Frame(angle=-100) {
S:Rudder(angle=FOLD) {
S:Wheel(power=-GO, brake=BRAKE) { }
}
S:TrimF(angle=90, option=1) {
S:Jet(angle=180, power=JET2) { }
}
N:TrimF(angle=90, option=1) {
S:Frame(angle=180, option=1) {
S:Jet(angle=180, power=JET2) { }
}
}
N:Rudder(angle=-FOLD) {
N:Wheel(angle=-HANDLE, power=-GO, brake=BRAKE) { }
}
}
N:Jet(angle=-90, power=-JET) { }
}
W:Jet(power=JET2) {
W:Frame(angle=-100) {
S:Rudder(angle=-FOLD) {
S:Wheel(power=GO, brake=BRAKE) { }
}
S:TrimF(angle=90, option=1) {
S:Jet(angle=180, power=-JET2) { }
}
N:TrimF(angle=90, option=1) {
S:Frame(angle=180, option=1) {
S:Jet(angle=180, power=-JET2) { }
}
}
N:Rudder(angle=FOLD) {
N:Wheel(angle=HANDLE, power=GO, brake=BRAKE) { }
}
}
N:Jet(angle=-90, power=-JET) { }
}
N:Jet() { }
S:Jet() { }
}
}
Script
{
if change=0 {jet2=-40000}
if change=1 {jet2=0}
print 6,"Arrows = Drive"
print 7,"Z/X = Drive Jets +/-"
print 8,"C = Wall Jets Off"
print 9,"A = Fold"
print 10,"S/D = Break On/Off"
print 12,"X=",_X (CORE)
print 13,"Y=",_Y (CORE)
print 14,"Z=",_Z (CORE)}
Fox Explorer- Plane
- Posts : 25
Join date : 2011-06-08
RigidChips :: Rigid-Chips :: Files :: Cars
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum