jshock 513 Posted November 16, 2014 It needs to be way more into the physics for both cars together and individually, that's why I brought up the point of having it somehow "follow" the terrain so it doesn't look clunky and weirdly floating. The other issue as well is that I'm not sure how taxing setting/finding velocities on two different vehicles via while loop is on performance but if you have a lot of people towing at the same time I would imagine it would be pretty detrimental (but I could be wrong). Share this post Link to post Share on other sites
thefinanator 10 Posted November 16, 2014 It needs to be way more into the physics for both cars together and individually, that's why I brought up the point of having it somehow "follow" the terrain so it doesn't look clunky and weirdly floating. The other issue as well is that I'm not sure how taxing setting/finding velocities on two different vehicles via while loop is on performance but if you have a lot of people towing at the same time I would imagine it would be pretty detrimental (but I could be wrong). Has anyone tried to loop a function that simply lifts the car half a meter or do into the air? It might reduce wheel friction making it possible to drag? Share this post Link to post Share on other sites
Greenfist 1863 Posted November 16, 2014 Has anyone tried to loop a function that simply lifts the car half a meter or do into the air? It might reduce wheel friction making it possible to drag? Yes... http://gfycat.com/ThirstyConsciousKookaburra :) Share this post Link to post Share on other sites
Viba 1 Posted November 16, 2014 I see well perhaps something more like this? loop = alive car1; while {true} do { _vel = velocity car1; if (_vel > 3) then { car2 setVelocity [_vel select 0, 0, 0] } else { car2 setVelocity [0, 0, 0] } }; or something like loop = alive car1; while {true} do { _vel = velocity car1; if (_vel > 5) then { car2 setVelocity [5, 0, 0] } else { car2 setVelocity [0, 0, 0] } }; I need some way to prevent negatives on the X angle I think but are the variables dependent of the entity or the world? I think I am getting a bit out of my depth though. :) Practically a loop is not going to cut it. You can probably simulate the correct physics but it takes alot of work and performance wise in a multiplayer game it's not ideal. The loop method was used pretty neatly in a towing script for aircraft in A2, can't remember the correct one but it looked pretty realistic. Instead all we need is a way to not have the breaks applied 24/7 on the vehicle :) Share this post Link to post Share on other sites
gippo 38 Posted November 16, 2014 Instead all we need is a way to not have the breaks applied 24/7 on the vehicle :) That would be awesome. Basically the fastest way to stop a vehicle is to hop into the passenger seat or eject. I'm also working on a towing script but I'm afraid even I can simulate proper physics, it will be glitchy. Share this post Link to post Share on other sites
Tajin 349 Posted November 16, 2014 Practically a loop is not going to cut it......Instead all we need is a way to not have the breaks applied 24/7 on the vehicle :) I know I'm repeating myself but... using attachTo with another physics object that doesn't have rubber tires coated with superglue works pretty well. That is both the easiest and probably also the most realistic workaround. Share this post Link to post Share on other sites
Viba 1 Posted November 17, 2014 (edited) Yes ofcourse attachTo has been used for a long time and is really easy to do. But wasn't the point of this thread to actually tow using the ropes? :) Edit: Just re-read your post, haven't actually tried that. Maybe best I'll go to sleep. Edited November 17, 2014 by Viba Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted November 17, 2014 I know I'm repeating myself but...using attachTo with another physics object that doesn't have rubber tires coated with superglue works pretty well. That is both the easiest and probably also the most realistic workaround. Unfortunately with attachTo you lose some simulation, it doesn't look entirely realistic, and there are collision anomalies as well. And, there are already quite a few attachTo-wrapper towing scripts out there already... That said, with the rope approach ... The vids posted don't look anything like towing a vehicle. No where on YouTube can I find a video of a vehicle being towed solely by a length of stretchy rope. I think a more successful script would be to simulate a vehicle recovery winch system, for the front of some vehicles, and actionable by the player. - player walks around to front of his winch-equipped vehicle. - player 'grabs' the winch from his vehicle via addAction and anim. - player walks the winch a certain distance to the second vehicle. a loop checks distance and terminates the script if he gets too far. - attaches it to second vehicle. (can the rope attach to a player, so as to simulate walking with a rope in hand and attaching it to the vehicle by hand?) - player gets in the first vehicle and has a 'Winch' action, which when actioned, removes the winch action and pulls the second vehicle toward the players vehicle, and also allows the player to reverse his own vehicle, with some setMass/setCenterOfMass maths applied. Also a get velocity loop to ensure the player is not driving forward, in which case the winch system terminates, to prevent sillyness. Share this post Link to post Share on other sites
Tajin 349 Posted November 17, 2014 The vids posted don't look anything like towing a vehicle. No where on YouTube can I find a video of a vehicle being towed solely by a length of stretchy rope. Really? http://www.lmgtfy.com/?q=towrope And you're somewhat missing the point. This isn't really about what features a towing system should have. It's just about getting around the sticky-wheels problem. Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted November 17, 2014 Really?http://www.lmgtfy.com/?q=towrope He's right though (I know, semantics), you'd need at least one additional guy in the towed car to steer and brake. The sticky wheels problem is a tough one, I give you that, couldn't come up with a solution to it yet. Share this post Link to post Share on other sites
Yolo Joe 11 Posted November 17, 2014 Is there any way to ask BIS about this? Share this post Link to post Share on other sites
mindstorm 8 Posted November 18, 2014 Has anyone tried putting an AI inside the vehicle. If it works you could hide the ai with: objectname hideObjectGlobal true; Share this post Link to post Share on other sites
Greenfist 1863 Posted November 18, 2014 Has anyone tried putting an AI inside the vehicle.If it works you could hide the ai with: objectname hideObjectGlobal true; Just putting a guy in doesn't help. He still keeps the brake pedal down. Share this post Link to post Share on other sites
kovvalsky 13 Posted November 18, 2014 (edited) on cfgVehicles >> "C_Hatchback_01_F" there is a parameter named brakeIdleSpeed.. WIKI brakeIdleSpeed is speed in m/s under which the brakes are automatically applied to the vehicle. This speed should be reasonably low, higher value would mean strange breaking of slow cars, too low value would cause inability to stop the car. (maybe we can override this parameter) Edited November 18, 2014 by KoVValsky Share this post Link to post Share on other sites
mindstorm 8 Posted November 18, 2014 on cfgVehicles >> "C_Hatchback_01_F" there is a parameter named brakeIdleSpeed.. WIKI brakeIdleSpeed is speed in m/s under which the brakes are automatically applied to the vehicle. This speed should be reasonably low, higher value would mean strange breaking of slow cars, too low value would cause inability to stop the car. (maybe we can override this parameter) This can only be done with mods. Share this post Link to post Share on other sites
das attorney 858 Posted November 18, 2014 You can change it to zero and it doesn't do anything useful. The issue is that brakes are automatically applied when no-one is in the car. This parameter only affects the speed that the brakes are applied when someone is in the car. Just tried towing a vehicle in the editor with brakeidlespeed set to 0 and it still has locked brakes (engine on or off) if there is no-one in the car. Share this post Link to post Share on other sites
Tankbuster 1744 Posted November 18, 2014 Arma 2 had an invisible man unit. The last time I checked, A3 doesn't have one. I'm thinking put him in the driving seat to get the brakes off. edit.. kill him once he's in the seat. The brakes should stay off. Share this post Link to post Share on other sites
Greenfist 1863 Posted November 18, 2014 Arma 2 had an invisible man unit. The last time I checked, A3 doesn't have one. I'm thinking put him in the driving seat to get the brakes off.edit.. kill him once he's in the seat. The brakes should stay off. I think the hand brake still activates when the vehicle stops. Just like when you shoot a driver of a moving car. Share this post Link to post Share on other sites
Tankbuster 1744 Posted November 18, 2014 Even when he's dead? Share this post Link to post Share on other sites
Greenfist 1863 Posted November 18, 2014 Yeah, first the car rolls freely and when it stops the wheels are locked. And you can only keep the car moving with a living foot on the gas pedal. AFAIK. Share this post Link to post Share on other sites
Viba 1 Posted November 18, 2014 Yup doesn't help having AI or actual player inside the vehicle, brakes are still on. Share this post Link to post Share on other sites
Falsche9 11 Posted November 19, 2014 (edited) Anyone tried setVelocityTransformation ? setVelocityTransformation example /* Rope Towing Script for Arma3 --->> setVelocityTransformation Not a bad result with only a little stutter and better than either setVelocity or attachTo as all vectors/directions are matched without rigid link, but strage things can happen if the rope is too short or _time value is too low. 0 = [car1,car2] execVM "tow.sqf"; */ private ["_v1","_v2","_rope","_dist","_time","_spd","_v1_pos","_dir","_newPos","_arr"]; _v1 = _this select 0; _v2 = _this select 1; _rope = ropeCreate [_v1, [0,-3,0], _v2, [0,1.5,-1], 10]; _dist = 12; while {alive _v1} do { _time = 0.07;//set this too low and bungee effects! _spd = speed _v1; _v1_pos = getPosASL _v1; _dir = (getDir _v1) + 180; _newPos = [ (_v1_pos select 0) + _dist*sin _dir, (_v1_pos select 1) + _dist*cos _dir, _v1_pos select 2 ]; _arr = [getPosASL _v2, _newPos, velocity _v2, velocity _v1, vectorDir _v2, vectorDir _v1, vectorUp _v2, vectorUp _v1, _time]; if (_spd > 1) then {_v2 setVelocityTransformation _arr}; }; edit: something needs adjusting in the array - works well on flat terrain nut goes FUBAR on hills - towed car floats. Edited November 19, 2014 by Falsche9 Share this post Link to post Share on other sites
Grumpy Old Man 3545 Posted November 28, 2014 I guess the only viable solution would be to remove the automatically applied brake and add something similar to the wheel brake on choppers for cars and other ground vehicles. Would probably require a good chunk of work from BIs side. Share this post Link to post Share on other sites
D. Patterson 14 Posted November 29, 2014 As soon as cars velocity changes from 0, the brakes are released. So when car1 attach point is _ropeLength (or just under) away from car2 attachpoint setVelocity to some low value. Share this post Link to post Share on other sites