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: 2333
Joined: Wed Sep 01, 2010 12:54 am

Mon Apr 21, 2014 7:09 pm

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.8 Beta...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
Download and Play in 1.7...
Star Castle Arcade: Relive classic arcade gaming in a new Transcendence adventure!
Playership Drones v7 (Beta): (OUTDATED!) Acquire and command almost any ship in Stars of the Pilgrim or Eternity Port.
Work in progress... Playership Drones v8: On hiatus!

User avatar
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?

Mon Apr 21, 2014 11:43 pm

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: 2333
Joined: Wed Sep 01, 2010 12:54 am

Sun May 11, 2014 2:24 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.8 Beta...
Drake Technologies (Alpha): More hardware for combat in parts 1 and 2!
Godmode v3 (WIP): Dev/cheat tool compatible with D&O parts 1 or 2.
Download and Play in 1.7...
Star Castle Arcade: Relive classic arcade gaming in a new Transcendence adventure!
Playership Drones v7 (Beta): (OUTDATED!) Acquire and command almost any ship in Stars of the Pilgrim or Eternity Port.
Work in progress... Playership Drones v8: On hiatus!

User avatar
pixelfck
Militia Captain
Militia Captain
Posts: 571
Joined: Tue Aug 11, 2009 8:47 pm
Location: Travelling around in Europe

Sun May 11, 2014 8:26 am

+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