Space Engineers

Space Engineers

Not enough ratings
Unlimited Raycasting
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Block
File Size
Posted
Updated
368.564 KB
26 Jul, 2017 @ 4:19am
28 Sep, 2017 @ 2:56pm
3 Change Notes ( view )

Subscribe to download
Unlimited Raycasting

Description
This mod changes the original camera block and does not create a new one!

Summary
  • TimeMultiplier extremely increased (main feature!) (shortens the time for raycasts to ~0)
  • ConeLimit increased
  • ChargingEnergyConsumption increased

Introduction
Do you have the problem that you always have to wait until your camera has enough raycast distance?
This mod should solve it.

Changes
The RaycastTimeMutiplier should be high enough so that any "normal" distance can be casted immediately.
The ConeLimit has been increased due to the model of the block.
To keep it balanced: The ChargingInput has also been increased. (not high enough for true balance)

And why should I use it?
Imagine the following situation:
  • You need to measure the distance to an object continuously (which means you need to keep track of it). How fast can you do that with your regular camera (assuming a IMyCameraBlock.Raycast(10000))? Exactly every 5 seconds. If you hit on it, you know the velocity vector and you can cast at [oldPosition + deltaTime * velocity]. If deltaTime is a small value, you can follow the object. But in 5 seconds your object could move 500 meters in a straight line (-> works) or it could change the direction and you lose it. With the mod: You are ready to scan in 1e-8 (~0) seconds!
Math behind it:
// distance in meters, result in seconds static double timeUntilScan(double distance) { return distance/timeMultiplier/1000d; //timeMultiplier: see detail-table }


Do you want the mod with some extra zoom?
Unlimited Raycasting - more zoom

Details
Attribute
Was
Now
ChargingInput
0.001
0.5

ConeLimit
45
75

TimeMultiplier
2
1e9

Conflicts
Only with mods that want to modify the original camera.

What happens if I remove the mod?
This mod changes the attributes of the original block so you should be safe to remove it without corrupting the world.
9 Comments
[7HBK] Elrond McBong 29 Jan, 2021 @ 3:55pm 
@Babbayega

AWG's Convenient Weapon Pack have a laser range finder that shows the target distance.
Ikarus_Sol_314  [author] 11 May, 2018 @ 6:07pm 
Unfortunately not. I use my own rangefinder-scripts,so I can not tell you which workshop scripts are up to date.
Babbayega 11 May, 2018 @ 5:58pm 
do you have a recomendation on a mod/script that can simply tell me how far away what i am looking at is?
Ikarus_Sol_314  [author] 11 May, 2018 @ 5:56pm 
You have to write your own script (or use one from the workshop). This mod increases the speed at which you can use raycasts. Vanilla SE allows (for example) 10km raycast only every 5 seconds, with this mod you can nearly instantly raycast.
Babbayega 11 May, 2018 @ 5:31pm 
ok, so, i do like the zoom in that version. but a got a noob question. where do i see the distance to what i am looking at? how do i actually use the script. or am i missing sumthin obvious..
jTurp 15 Jan, 2018 @ 1:41pm 
Hey, I apologize for not responding earlier. Thanks for taking a look into it! I ended up just changing the multiplier myself, but seeing that you have, I'll go back to using this instead of my tweaked version.
Ikarus_Sol_314  [author] 28 Sep, 2017 @ 3:18pm 
I wasn't able to detect a sim speed drop (2000 cameras with raycasting enabled, still 1.00 sim speed), but I adjusted the multiplier a bit (2^30) for a faster calculation. Maybe it helped?
Ikarus_Sol_314  [author] 28 Sep, 2017 @ 3:12pm 
You can override the camera's blockdefinition and adjust the values as you like. Use the camera definition in CubeBlock.sbc as sample.

I use a very complex script which consumes about the half of the available range per tick, so I thought I found a good multiplier. (But you are free to change it of course!)

Thanks
jTurp 20 Sep, 2017 @ 5:49am 
How do I edit the values? I've realized that I can scan 25 Billion meters every TICK with this mod, and that is a tad too much. I've also noticed sim speed drops, and the only thing I can think of is that it's having to query such large numbers for multiple cameras every tick. If I output the available scan range to an LCD, it shows 1.92839823982e+15

Nice mod, though! The base raycast was definitely too limited.