Request collision detection functions for hitscan attacks.

Post ideas & suggestions you have pertaining to the game here.
Post Reply
PM
Fleet Admiral
Fleet Admiral
Posts: 2570
Joined: Wed Sep 01, 2010 12:54 am

sysFindObject helps find objects along a given angle, but is useless for finding hit positions of targets struck. ObjGetDistance only works with objects' centers, which is useless for finding the equivalent of aHitPos when some objects like planets have a diameter of range 10+. Below are the requests.

* Function that accepts a vector (point in space) and checks if that point is inside the white (or non-black) of an object's mask. If so, return the (topmost) object hit, else return Nil.

* Function that accepts two vectors (points in space), source and destination, and check if the line from source to destination intersects with the first object struck. If so, return hit position and/or object struck, else return Nil.
Download and Play in 1.9 beta 1...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!

Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Seconded, but maybe this can be merged with SysFindObject?
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
PM
Fleet Admiral
Fleet Admiral
Posts: 2570
Joined: Wed Sep 01, 2010 12:54 am

Another thing I discovered about (sysFindObject ...) when an angle is passed to it is it only detects the object if the line passes through it at a distance of at least its approximate radius. For example, the line needs to travel at least 5 light-seconds through a big gas giant with a radius of 5. To put it another way, the line may not detect a big gas giant if the line barely clips its edge.

A seemingly simple function that determines if a point hits something/anything would be really useful.
Download and Play in 1.9 beta 1...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Star Castle Arcade: Play a classic arcade game adventure, with or without more features (like powerups)!
Playership Drones: Buy or restore exotic ships to command!

Other playable mods from 1.8 and 1.7, waiting to be updated...
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

+1 this would be useful functionality.

~Pixelfck
Image
Download the Black Market Expansion from Xelerus.de today!
My other mods at xelerus.de
Post Reply